﻿using System;
using System.Collections.Generic;
using Rabbit.Logic;

namespace RabbitManage.UI
{
    public partial class DiliveryCostStrategy : System.Web.UI.Page
    {
        //protected string uid = string.Empty;
        protected List<ProvinceCity> list;
        //protected string aid = string.Empty;
        protected Address address = new Address();

        protected string stragegyName = string.Empty;
        protected decimal cost = 0;
        protected decimal greaterThan = 0;

        protected void Page_Load(object sender, EventArgs e)
        {
            list = CityData.GetMainlandData();
            provinceRepeater.DataSource = list;
            provinceRepeater.DataBind();

            //list = RabbitUse.GetProductList(Db.Store);
            //productRepeater.DataSource = list;
            //productRepeater.DataBind();

            //if (Request.Cookies[Constant.CookieName] != null)
            //{
            //    string id = Request.Cookies[Constant.CookieName].Values[Constant.CookieUid];
            //    if (string.IsNullOrEmpty(id)) Response.Redirect("UserLogon.aspx");
            //    uid = id;

            //    Customer customer = RabbitUse.GetCustomerById(Db.Store, uid);
            //    list = customer.AddressList;
            //    myRepeater.DataSource = list;
            //    myRepeater.DataBind();


            //    aid = Request["aid"];
            //    if (string.IsNullOrEmpty(aid)) return;
            //    int addressId;
            //    if (int.TryParse(aid, out addressId))
            //    {
            //        if (list.Count <= addressId) return;
            //        address = list[addressId];
            //    }
            //}
            //else
            //{
            //    Response.Redirect("UserLogon.aspx");
            //}
        }
    }
}